// 导入数据库模块
const { User } = require('../../../model/users');

module.exports = async (req, res) => {
  const id = req.body._id;
  // 根据用户名找到用户数据
  let user = await User.remove({_id: id});

  res.success({
    message: '删除用户成功！',
    data: user,
  });
};
